.class public abstract Lcom/instagram/creation/video/h/f;
.super Lcom/instagram/creation/video/gl/a;
.source "OESInputRenderer.java"


# annotations
.annotation build Landroid/annotation/TargetApi;
    value = 0xe
.end annotation


# instance fields
.field private a:I

.field private b:[I

.field private c:[Landroid/graphics/SurfaceTexture;

.field private d:[F

.field private e:Ljava/util/Queue;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Queue",
            "<",
            "Ljava/lang/Runnable;",
            ">;"
        }
    .end annotation
.end field

.field protected h:Lcom/instagram/creation/video/e/l;


# direct methods
.method public constructor <init>(I)V
    .locals 1
    .parameter

    .prologue
    .line 33
    invoke-direct {p0}, Lcom/instagram/creation/video/gl/a;-><init>()V

    .line 28
    const/16 v0, 0x10

    new-array v0, v0, [F

    iput-object v0, p0, Lcom/instagram/creation/video/h/f;->d:[F

    .line 34
    new-array v0, p1, [I

    iput-object v0, p0, Lcom/instagram/creation/video/h/f;->b:[I

    .line 35
    new-array v0, p1, [Landroid/graphics/SurfaceTexture;

    iput-object v0, p0, Lcom/instagram/creation/video/h/f;->c:[Landroid/graphics/SurfaceTexture;

    .line 37
    new-instance v0, Lcom/instagram/creation/video/e/l;

    invoke-direct {v0}, Lcom/instagram/creation/video/e/l;-><init>()V

    iput-object v0, p0, Lcom/instagram/creation/video/h/f;->h:Lcom/instagram/creation/video/e/l;

    .line 39
    new-instance v0, Ljava/util/LinkedList;

    invoke-direct {v0}, Ljava/util/LinkedList;-><init>()V

    iput-object v0, p0, Lcom/instagram/creation/video/h/f;->e:Ljava/util/Queue;

    .line 40
    return-void
.end method


# virtual methods
.method public a()V
    .locals 0

    .prologue
    .line 80
    return-void
.end method

.method public a(I)V
    .locals 4
    .parameter

    .prologue
    .line 43
    const/4 v0, 0x0

    :goto_0
    iget-object v1, p0, Lcom/instagram/creation/video/h/f;->c:[Landroid/graphics/SurfaceTexture;

    array-length v1, v1

    if-ge v0, v1, :cond_0

    .line 44
    iget-object v1, p0, Lcom/instagram/creation/video/h/f;->b:[I

    const v2, 0x8d65

    invoke-static {v2}, Lcom/instagram/creation/base/d;->a(I)I

    move-result v2

    aput v2, v1, v0

    .line 45
    iget-object v1, p0, Lcom/instagram/creation/video/h/f;->c:[Landroid/graphics/SurfaceTexture;

    new-instance v2, Landroid/graphics/SurfaceTexture;

    iget-object v3, p0, Lcom/instagram/creation/video/h/f;->b:[I

    aget v3, v3, v0

    invoke-direct {v2, v3}, Landroid/graphics/SurfaceTexture;-><init>(I)V

    aput-object v2, v1, v0

    .line 43
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 48
    :cond_0
    iget-object v0, p0, Lcom/instagram/creation/video/h/f;->h:Lcom/instagram/creation/video/e/l;

    invoke-virtual {v0}, Lcom/instagram/creation/video/e/l;->c()I

    .line 49
    return-void
.end method

.method public a(Lcom/instagram/creation/video/gl/i;)V
    .locals 3
    .parameter

    .prologue
    .line 53
    iget-object v1, p0, Lcom/instagram/creation/video/h/f;->e:Ljava/util/Queue;

    monitor-enter v1

    .line 54
    :try_start_0
    iget-object v0, p0, Lcom/instagram/creation/video/h/f;->e:Ljava/util/Queue;

    invoke-interface {v0}, Ljava/util/Queue;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Runnable;

    .line 55
    invoke-interface {v0}, Ljava/lang/Runnable;->run()V

    goto :goto_0

    .line 57
    :catchall_0
    move-exception v0

    monitor-exit v1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v0

    :cond_0
    :try_start_1
    monitor-exit v1
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 59
    const/16 v0, 0x4100

    invoke-static {v0}, Landroid/opengl/GLES20;->glClear(I)V

    .line 61
    iget-object v0, p0, Lcom/instagram/creation/video/h/f;->c:[Landroid/graphics/SurfaceTexture;

    iget v1, p0, Lcom/instagram/creation/video/h/f;->a:I

    aget-object v0, v0, v1

    invoke-virtual {v0}, Landroid/graphics/SurfaceTexture;->updateTexImage()V

    .line 62
    iget-object v0, p0, Lcom/instagram/creation/video/h/f;->c:[Landroid/graphics/SurfaceTexture;

    iget v1, p0, Lcom/instagram/creation/video/h/f;->a:I

    aget-object v0, v0, v1

    iget-object v1, p0, Lcom/instagram/creation/video/h/f;->d:[F

    invoke-virtual {v0, v1}, Landroid/graphics/SurfaceTexture;->getTransformMatrix([F)V

    .line 64
    invoke-virtual {p0}, Lcom/instagram/creation/video/h/f;->b()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 65
    const v0, 0x8d40

    invoke-virtual {p0, p1}, Lcom/instagram/creation/video/h/f;->b(Lcom/instagram/creation/video/gl/i;)Lcom/instagram/creation/video/gl/i;

    move-result-object v1

    invoke-interface {v1}, Lcom/instagram/creation/video/gl/i;->a()I

    move-result v1

    invoke-static {v0, v1}, Landroid/opengl/GLES20;->glBindFramebuffer(II)V

    .line 66
    iget-object v0, p0, Lcom/instagram/creation/video/h/f;->h:Lcom/instagram/creation/video/e/l;

    iget-object v1, p0, Lcom/instagram/creation/video/h/f;->b:[I

    iget v2, p0, Lcom/instagram/creation/video/h/f;->a:I

    aget v1, v1, v2

    iget-object v2, p0, Lcom/instagram/creation/video/h/f;->d:[F

    invoke-virtual {v0, v1, v2}, Lcom/instagram/creation/video/e/l;->a(I[F)V

    .line 69
    :cond_1
    invoke-virtual {p0, p1}, Lcom/instagram/creation/video/h/f;->c(Lcom/instagram/creation/video/gl/i;)V

    .line 70
    return-void
.end method

.method public a(Lcom/instagram/pendingmedia/model/a;)V
    .locals 4
    .parameter

    .prologue
    .line 89
    iget-object v0, p0, Lcom/instagram/creation/video/h/f;->h:Lcom/instagram/creation/video/e/l;

    invoke-virtual {p1}, Lcom/instagram/pendingmedia/model/a;->i()F

    move-result v1

    invoke-static {p1}, Lcom/instagram/creation/video/j/c;->a(Lcom/instagram/pendingmedia/model/a;)I

    move-result v2

    const/4 v3, 0x0

    invoke-virtual {v0, v1, v2, v3}, Lcom/instagram/creation/video/e/l;->a(FIZ)V

    .line 91
    return-void
.end method

.method protected abstract b(Lcom/instagram/creation/video/gl/i;)Lcom/instagram/creation/video/gl/i;
.end method

.method public b(Lcom/instagram/pendingmedia/model/a;)V
    .locals 4
    .parameter

    .prologue
    .line 94
    iget-object v0, p0, Lcom/instagram/creation/video/h/f;->h:Lcom/instagram/creation/video/e/l;

    invoke-virtual {p1}, Lcom/instagram/pendingmedia/model/a;->i()F

    move-result v1

    invoke-static {p1}, Lcom/instagram/creation/video/j/c;->a(Lcom/instagram/pendingmedia/model/a;)I

    move-result v2

    invoke-static {p1}, Lcom/instagram/creation/video/j/c;->b(Lcom/instagram/pendingmedia/model/a;)Z

    move-result v3

    invoke-virtual {v0, v1, v2, v3}, Lcom/instagram/creation/video/e/l;->a(FIZ)V

    .line 97
    iget-object v0, p0, Lcom/instagram/creation/video/h/f;->h:Lcom/instagram/creation/video/e/l;

    invoke-virtual {p1}, Lcom/instagram/pendingmedia/model/a;->e()F

    move-result v1

    invoke-virtual {v0, v1}, Lcom/instagram/creation/video/e/l;->a(F)V

    .line 98
    return-void
.end method

.method public c(I)Landroid/graphics/SurfaceTexture;
    .locals 1
    .parameter

    .prologue
    .line 105
    iget-object v0, p0, Lcom/instagram/creation/video/h/f;->c:[Landroid/graphics/SurfaceTexture;

    aget-object v0, v0, p1

    return-object v0
.end method

.method protected c(Lcom/instagram/creation/video/gl/i;)V
    .locals 0
    .parameter

    .prologue
    .line 75
    return-void
.end method

.method public d()Landroid/graphics/SurfaceTexture;
    .locals 2

    .prologue
    .line 101
    iget-object v0, p0, Lcom/instagram/creation/video/h/f;->c:[Landroid/graphics/SurfaceTexture;

    const/4 v1, 0x0

    aget-object v0, v0, v1

    return-object v0
.end method

.method public e()V
    .locals 2

    .prologue
    .line 126
    iget-object v0, p0, Lcom/instagram/creation/video/h/f;->c:[Landroid/graphics/SurfaceTexture;

    iget v1, p0, Lcom/instagram/creation/video/h/f;->a:I

    aget-object v0, v0, v1

    invoke-virtual {v0}, Landroid/graphics/SurfaceTexture;->updateTexImage()V

    .line 127
    return-void
.end method
